package com.infolab.aims.web.taglib;

import javax.servlet.jsp.JspException;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.web.servlet.tags.form.LabelTag;
import org.springframework.web.servlet.tags.form.TagWriter;

public class ColumnTag  extends LabelTag {
	
	private Log logger = LogFactory.getLog(getClass());

	private static final String LABEL_TAG = "p";

	private TagWriter tagWriter;
	
	private String columnName;
	private String label;
	
	protected int writeTagContent(TagWriter tagWriter) throws JspException {
		
		tagWriter.startTag(LABEL_TAG);
		writeDefaultAttributes(tagWriter);
		tagWriter.forceBlock();
		this.tagWriter = tagWriter;
		return EVAL_BODY_INCLUDE;
	}
	
	public int doEndTag() throws JspException {
		this.tagWriter.endTag();
		return EVAL_PAGE;
	}
}
